package com.moon.gossipnews.app;

import android.app.Application;
import android.util.DisplayMetrics;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;

/**
 * ***********************************************************
 * author: alex
 * time: 16/7/7 上午10:04
 * name:
 * overview:
 * usage:
 * *************************************************************
 */
public class IApp extends Application {
    public static int mScreenHeight;
    public static int mScreenWidth;
    @Override
    public void onCreate() {
        super.onCreate();
        initScreen();
        ImageLoaderConfiguration configuration = new ImageLoaderConfiguration.Builder(this)
                .diskCacheSize(30 * 1024 * 1024)
                .memoryCacheSize(20 * 1024 * 1024)
                .build();
        ImageLoader.getInstance().init(configuration);
    }

    private void initScreen() {
        DisplayMetrics displayMetrics=getResources().getDisplayMetrics();
        mScreenHeight=displayMetrics.heightPixels;
        mScreenWidth=displayMetrics.widthPixels;

    }
}
